package com.ftg.learn.smhtml.qianduan.contorller;

import com.ftg.learn.smhtml.qianduan.pojo.Guanyu;
import com.ftg.learn.smhtml.qianduan.service.GuanyuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


@RestController
@CrossOrigin
@RequestMapping("/guanyu")

public class GuanyuContorller {

    @Autowired
    GuanyuService as;

    @GetMapping("/showguanyu")
    public List<Guanyu> showall(){
        return as.showAll();

    }
}
